package com.pengxun.manager.model.system;

import java.util.Date;
import java.util.List;

import javax.validation.constraints.NotBlank;


public class Menu{
	private String pageUrl;
	private String parentMenuCode;
	private Integer menuOrder;
	private String falseUrl;
	private String menuIcon;
	private String remark;
	private Date updateDate;
	private Long createBy;
	@NotBlank(message="菜单名称不能为空")
	private String menuName;
	private String menuCode;
	private Date createDate;
	private Long updateBy;
	private Integer menuId;
	private Integer status;
	private Integer menuType;
	
	private List<Menu> children;
	private List<Permission> permissions;
	
	public String getPageUrl(){
		return this.pageUrl;
	}
	public void setPageUrl(String pageUrl){
		this.pageUrl=pageUrl;
	}
	public String getParentMenuCode(){
		return this.parentMenuCode;
	}
	public void setParentMenuCode(String parentMenuCode){
		this.parentMenuCode=parentMenuCode;
	}
	public Integer getMenuOrder(){
		return this.menuOrder;
	}
	public void setMenuOrder(Integer menuOrder){
		this.menuOrder=menuOrder;
	}
	public String getFalseUrl(){
		return this.falseUrl;
	}
	public void setFalseUrl(String falseUrl){
		this.falseUrl=falseUrl;
	}
	public String getMenuIcon(){
		return this.menuIcon;
	}
	public void setMenuIcon(String menuIcon){
		this.menuIcon=menuIcon;
	}
	public String getRemark(){
		return this.remark;
	}
	public void setRemark(String remark){
		this.remark=remark;
	}
	public Date getUpdateDate(){
		return this.updateDate;
	}
	public void setUpdateDate(Date updateDate){
		this.updateDate=updateDate;
	}
	public Long getCreateBy(){
		return this.createBy;
	}
	public void setCreateBy(Long createBy){
		this.createBy=createBy;
	}
	public String getMenuName(){
		return this.menuName;
	}
	public void setMenuName(String menuName){
		this.menuName=menuName;
	}
	public String getMenuCode(){
		return this.menuCode;
	}
	public void setMenuCode(String menuCode){
		this.menuCode=menuCode;
	}
	public Date getCreateDate(){
		return this.createDate;
	}
	public void setCreateDate(Date createDate){
		this.createDate=createDate;
	}
	public Long getUpdateBy(){
		return this.updateBy;
	}
	public void setUpdateBy(Long updateBy){
		this.updateBy=updateBy;
	}
	public Integer getMenuId(){
		return this.menuId;
	}
	public void setMenuId(Integer menuId){
		this.menuId=menuId;
	}
	public Integer getStatus(){
		return this.status;
	}
	public void setStatus(Integer status){
		this.status=status;
	}
	public Integer getMenuType() {
		return menuType;
	}
	public void setMenuType(Integer menuType) {
		this.menuType = menuType;
	}
	public List<Menu> getChildren() {
		return children;
	}
	public void setChildren(List<Menu> children) {
		this.children = children;
	}
	public List<Permission> getPermissions() {
		return permissions;
	}
	public void setPermissions(List<Permission> permissions) {
		this.permissions = permissions;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((menuId == null) ? 0 : menuId.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Menu other = (Menu) obj;
		if (menuId == null) {
			if (other.menuId != null)
				return false;
		} else if (!menuId.equals(other.menuId))
			return false;
		return true;
	}
	
}